package com.edison.demo.until;

import java.util.Random;

/**
 * @author edison
 */
public class CustomerManagerNumberGenerator {

    private CustomerManagerNumberGenerator(){
        throw new IllegalStateException("Utility class");
    }

    private static final Random RANDOM = new Random();

    public static String generateCustomerManagerNumber() {
        // Decide the length randomly between 5 and 6 digits
        int length = RANDOM.nextBoolean() ? 5 : 6;

        // Generate a random number with the decided length
        StringBuilder managerNumber = new StringBuilder();
        for (int i = 0; i < length; i++) {
            managerNumber.append(RANDOM.nextInt(10));
        }

        return managerNumber.toString();
    }



}
